/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.q1.model.polymorphism;

/**
 *
 * @author user
 */
public class Rectangle extends Shape {
    
    private int length,width;
    
    public Rectangle(String color,int length,int width){
        
        super(color);
        this.length =length;
        this.width = width;
    }
    
    public String toString(){
        
        return "Rectangle of length ="+ length + " and width ="+width + ", subclass of "+ super.toString();
        
    }
    public double getArea(){
        return length * width;
    }
    
    
}
